home *** CD-ROM | disk | FTP | other *** search
/ Introduction to 3D Game …ogramming with DirectX 12 / Introduction-to-3D-Game-Programming-with-DirectX-12.ISO / Figures / Chapter 6 Drawing in Direct3D / Fig6-4.bmp (.png) < prev    next >
Bitmap Image  |  2016-03-02  |  1.4 MB  |  800x600  |  8-bit (33 colors)
   ocr: struct Vertex i XMFLOAT3 Pos; XMFLOAT4 Color; 1; D3D12 INPUT ELEMENT DESC vertexDesclJ = ( ("POSITION", 0, DXGI FORMAT R32G32B32. FLOAT, 0, 0, D3D12 INPUT PER VERTEX DATA, 0), ("COLOR", 0, DXGI FORMAT R32G32B32A32 - FLOAT, 0, 12, D3D12 INPUT PER VERTEX DATA, 0) 1; void VS(float3 iPosL : POSITION, float4 iColor : COLOR, out float4 OPOSH : SV_POSITION, out float4 oColor : COLOR) 11 Transform to nomogeneous clip space. OPOSH == mul(FLoat4(1POSL, 1.0f), gworldviewProj); 11 Just pass vertex color into the pixel shader. oColor = iColor;